package com.allwees.bs.c.module.logistics.controller;

import com.allwees.bs.c.module.base.controller.BaseController;
import com.allwees.bs.c.module.order.service.IOrderLogisticsService;
import com.allwees.bs.core.modelbase.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 物流明细
 *
 * @author yangylsky
 */
@Validated
@RestController
@RequestMapping("/api/v1/logistics")
public class LogisticsController extends BaseController {

    @Autowired
    private IOrderLogisticsService orderLogisticsService;

    /**
     * 获取物流明细
     */
    @GetMapping("{expressCode}")
    public R queryOrderLogistics(@PathVariable("expressCode") String expressCode) {
        return R.ok(orderLogisticsService.findByExpressCode(expressCode));
    }
}
